
<include file="layout/header" />
<!-- Right side column. Contains the navbar and content of the page -->
<script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
<script language="javascript">
    /*
     * 方法作用：更改form表单的action并提交
     */
    function changeStatus(obj){
        var str = "__CONTROLLER__/recordChange/status/" + obj;
        $("#formContractList").attr("action", str);
        var o = document.getElementsByName('selectedOne[]');
        var sid = new Array();
        for(x in o){
            if(o[x].checked == true){
                sid.push(o[x].value);
            }
        }
        $("#sid").val(sid);
        $("#formContractList").submit();

    }
</script>
<aside class="right-side">
    <section class="content-header">
        <h1>
            生产计划
            <small>Production Plan Manager</small>
        </h1>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-body table-responsive">
                        <ul class="nav nav-tabs">
                              <li role="presentation" class="active"><a href="__CONTROLLER__/">生产中</a></li>
                              <li role="presentation"><a href="__CONTROLLER__/planFinish">已完成</a></li>
                        </ul>
                        <br/>
                        <button class="btn btn-app btn-sm" onclick="location='__CONTROLLER__/recordNew'">新增</button>
                        <button class="btn btn-app btn-sm" onclick="changeStatus('已完成')">完成</button>
                        <form method="post" action="__CONTROLLER__/recordSearch" role="form" id="formContractList">
                            <input type="text" name="p_customer" class="form-control" placeholder="请输入查找的单位/公司名称...">
                            <input type="hidden" id="sid" name="sid"/>
                            <input type="hidden" id="wcf" name="wcf" value="planManager"/>
                            <input type="submit" class="btn btn-primary btn-sm" value="查找"/>
                        </form>
                        <table id="example2" class="table table-bordered table-hover text-left">
                            <thead>
                            <tr>
                                <th class="text-center">
                                <input type="checkbox" id="chk_all" name="chk_all" onclick="select_all(this)" />操作</th>
                                <th class="text-center">序号</th>
                                <th class="text-center">用户名称</th>
                                <th class="text-center">产品规格</th>
                                <th class="text-center">产品类型</th>
                                <th class="text-center">产品数量</th>
                                <th class="text-center">开始日期</th>
                                <th class="text-center">完成日期</th>
                                <th class="text-center">计划状态</th>
                                <th class="text-center">备注</th>
                            </tr>
                            </thead>
                            <tbody>
                            <volist name="plans" id="plan" empty="暂时没有数据" >
                                <tr>
                                    <td class="text-center">
                                        <input type="checkbox" name="selectedOne[]" value="{$plan.id}" />
                                        <button class="btn btn-danger btn-sm" onclick="location='__CONTROLLER__/recordDelete/id/{$plan.id}'"><i class="fa fa-times"></i></button>
                                        <button class="btn btn-success btn-sm" onclick="location='__CONTROLLER__/recordShow/id/{$plan.id}'"><i class="fa fa-edit"></i></button>
                                    </td>
                                    <td class="text-center">{$i}</td>
                                    <td>{$plan.p_customer}</td>
                                    <td>{$plan.p_guige}</td>
                                    <td>{$plan.c_type}</td>
                                    <td>{$plan.p_num}</td>
                                    <td>{$plan.p_stardate}</td>
                                    <td>{$plan.p_plandate}</td>
                                    <td>{$plan.p_status}</td>
                                    <td>{$plan.p_remark}</td>
                                </tr>
                            </volist>
                            </tbody>
                        </table>
                        <div class="text-center pagelist">
                            　　{$page}
                        </div>
                    </div><!-- /.box-body -->

                </div><!-- /.box -->
            </div>
        </div>
    </section>
</aside><!-- /.right-side -->
<include file="layout/footer" />
